{%- assign _title = page.title | default: layout.title -%}
{%- assign _titles = page.titles | default: layout.titles -%}

{%- if _title -%}
  {%- assign __return = _title -%}
{%- elsif _titles -%}
  {%- assign __locale = _titles -%}
  {%- include snippets/locale-to-string.html -%}
  {%- assign __localeTitle = __return -%}
  {%- assign __return = __localeTitle -%}
{%- else -%}
  {%- assign __return = nil -%}
{%- endif -%}